export default class ArgsManual {
    /***
     * @type: ArgsSchema
     */
    #schema

    /***
     *
     * @param schema : ArgsSchema
     */
    constructor(schema) {
        this.#schema = schema
    }

    #printFlag(flag) {
        console.log(`  -${flag}  <${this.#schema.typeOf(flag).name}>\t  ${this.#schema.descriptionOf(flag)} (default = ${JSON.stringify(this.#schema.defaultOf(flag))})`)
    }

    print() {
        console.log(``)
        console.log(`Flags:`)
        this.#schema.flags.forEach(this.#printFlag, this)
    }
}
